package com.xiangge.demo;

/**
 * @author xiangge
 * @date 2024.7.17
 * @deprecated 这是一个学生事务的类
 * @version 1.0
 */
public class OOPDemo3 {
    public static void main(String[] args) {
        Student student = new Student();
        student.eat();
        student.sleep();
        student.setAge(19);
        student.setName("落凌曦");
        student.setAddress("武汉");
        student.setScore(120);
        student.show();
    }
}
class Student{
    private String name;
    private int age;
    private String address;
    private int score;
    public Student() {
    }
    public Student(String name, int age, String address, int score) {
        this.name = name;
        this.age = age;
        this.address = address;
        this.score = score;
    }
    public void eat(){
        System.out.println("吃饭");
    }
    public void sleep(){
        System.out.println("睡觉");
    }
    public void show(){
        System.out.println(name+" "+age+" "+address+" "+score);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }
}
